import request from '@/utils/request.js'
const PATH = '/admin/exam'

// 获取考试列表
export const getExamList = ({
  page,
  pageSize,
  userName,
  testCategoryId,
  testExamName
}) => {
  return request.get(PATH + '/page', {
    params: {
      page,
      pageSize,
      userName,
      testCategoryId,
      testExamName
    }
  })
}

// 获取考试记录详情
export const getExamDetail = ({ page, pageSize, examId, examTopic }) => {
  return request.get(PATH + '/detail/page', {
    params: {
      page,
      pageSize,
      examId,
      examTopic
    }
  })
}

// 批量删除考试记录
export const batchDeleteExam = (ids) => {
  return request.delete(PATH + '/batchDelete', {
    params: {
      ids: ids.join(',')
    }
  })
}
